﻿<v:ViewBase x:Class="Microsoft.Research.DynamicDataDisplay.Samples.Internals.Views.FlatDemonstrationsView"
            xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
            xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
			xmlns:v="clr-namespace:Microsoft.Research.DynamicDataDisplay.Samples.Internals.Views"
            xmlns:vm="clr-namespace:Microsoft.Research.DynamicDataDisplay.Samples.Internals.ViewModels"
            DataContextChanged="OnDataContextChanged" SelectedValue="{Binding SelectedValue, ElementName=itemsControl}"
    >
    <v:ViewBase.Resources>
        <DataTemplate DataType="{x:Type vm:DemonstrationViewModel}">
            <StackPanel Orientation="Horizontal">
                <TextBlock Text="{Binding Demonstration.Description}"/>
                <TextBlock Text=" "/>
                <Grid Style="{StaticResource GridStyle}">
                    <Rectangle Style="{StaticResource RectangleStyle}"/>
                    <TextBlock Text="{Binding Version}" Style="{StaticResource TextStyle}"/>
                </Grid>
            </StackPanel>
        </DataTemplate>
    </v:ViewBase.Resources>
    
    <ListView x:Name="itemsControl" ItemsSource="{Binding}"/>
</v:ViewBase>
